<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <meta name="twitter:site" content="@metroui">
    <meta name="twitter:creator" content="@pimenov_sergey">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:title" content="Metro 4 Components Library">
    <meta name="twitter:description" content="Metro 4 is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with responsive grid system, extensive prebuilt components, and powerful plugins  .">
    <meta name="twitter:image" content="https://metroui.org.ua/images/m4-logo-social.png">

    <meta property="og:url" content="https://metroui.org.ua/v4/index.html">
    <meta property="og:title" content="Metro 4 Components Library">
    <meta property="og:description" content="Metro 4 is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with responsive grid system, extensive prebuilt components, and powerful plugins  .">
    <meta property="og:type" content="website">
    <meta property="og:image" content="https://metroui.org.ua/images/m4-logo-social.png">
    <meta property="og:image:secure_url" content="https://metroui.org.ua/images/m4-logo-social.png">
    <meta property="og:image:type" content="image/png">
    <meta property="og:image:width" content="968">
    <meta property="og:image:height" content="504">

    <meta name="author" content="Sergey Pimenov">
    <meta name="description" content="The most popular HTML, CSS, and JS library in Metro style.">
    <meta name="keywords" content="HTML, CSS, JS, Metro, CSS3, Javascript, HTML5, UI, Library, Web, Development, Framework">

    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
    <link rel="icon" href="favicon.ico" type="image/x-icon">

    <link href="metro/css/metro-all.css?ver=@@b-version" rel="stylesheet">
    <link href="highlight/styles/github.css" rel="stylesheet">
    <link href="docsearch/docsearch.min.css" rel="stylesheet">
    <link href="css/site.css" rel="stylesheet">

    <title>M4Q Effects - Metro 4 :: Popular HTML, CSS and JS library</title>

    <style>
        .demo-box {
            width: 100px;
            height: 100px;
            margin: 10px auto;
        }
    </style>
</head>
<body class="m4-cloak">

<header data-role="html-container" data-insert-mode="replace" data-html-source="header.html"></header>

<div data-role="html-container" data-insert-mode="replace" data-html-source="sidebar-menu.html"></div>

<div class="container-fluid docs-content">

    <div class="row flex-xl-nowrap">

            <div class="d-none d-block-xl cell-xl-2 order-2 border-left bd-light toc-wrapper">
                <h5>Table of contents</h5>
                <hr/>
                <ul class="toc-nav">
                    <li class="toc-entry"><a href="#">About</a></li>
                </ul>

            </div>

            <main class="cell-xl-10 order-1 pr-1-sx pl-1-sx pr-5-md pl-5-md">
                <div class="place-right d-none d-block-lg" style="width: 200px;">
                    <img src="images/logo.png" class="w-100" alt="">
                </div>

                <h1>M4Q Effects</h1>
                <p class="text-leader">
                    You can control element visibility with special effects functions.
                </p>

                <!-- ads-html -->

                <h3>About</h3>
                <p>
                    You can control element visibility with special visibility functions:
                        <code>fadeIn()</code>,
                        <code>fadeOut()</code>,
                        <code>slideIn()</code>,
                        <code>slideOut()</code>.
                </p>

                <h3>Fade effect</h3>
                <p>
                    To toggle element <code>display</code> property with <code>fade</code> effect, you can use functions <code>fadeIn()</code> and <code>fadeOut()</code>.
                </p>
                <div class="example text-center" style="height: 192px">
                    <button class="button" onclick="$('#div-fade').fadeIn()">Fade In</button>
                    <button class="button" onclick="$('#div-fade').fadeOut()">Fade Out</button>
                    <div id="div-fade" class="demo-box bg-red"></div>
                </div>
                <pre><code>
                    &lt;button class="button" onclick="$('#div-fade').fadeIn()"&gt;Fade In&lt;/button&gt;
                    &lt;button class="button" onclick="$('#div-fade').fadeOut()"&gt;Fade Out&lt;/button&gt;
                    &lt;div id="div-fade" class="demo-box bg-red"&gt;&lt;/div&gt;
                </code></pre>

                <h3>Slide effect</h3>
                <p>
                    To toggle element <code>display</code> property with <code>slide</code> effect, you can use functions <code>slideDown()</code> and <code>slideUp()</code>.
                </p>
                <div class="example text-center" style="height: 192px">
                    <button class="button" onclick="$('#div-slide').slideUp()">Slide Up</button>
                    <button class="button" onclick="$('#div-slide').slideDown()">Slide Down</button>
                    <div id="div-slide" class="demo-box bg-red"></div>
                </div>
                <pre><code>
                    &lt;button class="button" onclick="$('#div-slide').slideUp()"&gt;Slide Up&lt;/button&gt;
                    &lt;button class="button" onclick="$('#div-slide').slideDown()"&gt;Slide Down&lt;/button&gt;
                    &lt;div id="div-slide" class="demo-box bg-red"&gt;&lt;/div&gt;
                </code></pre>

                <h3>Function arguments</h3>
                <p>
                    Each effect function may take the following arguments:
                </p>
                <ul>
                    <li><b>duration</b> - animation duration</li>
                    <li><b>easing</b> - easing function name</li>
                    <li><b>callback</b> - function was executed when animation finished</li>
                </ul>
                <pre><code>
                    $(...).fadeIn(1000, 'linear', function(){
                       console.log('Animation done');
                    })
                </code></pre>
                <div class="example text-center" style="height: 192px">
                    <button class="button" onclick="$('#div-slide2').slideUp(1000, 'easeOutBounce')">Slide Up</button>
                    <button class="button" onclick="$('#div-slide2').slideDown(1000, 'easeOutBounce')">Slide Down</button>
                    <div id="div-slide2" class="demo-box bg-red"></div>
                </div>
                <pre><code>
                    &lt;button class="button"
                        onclick="$('#div-slide2').slideUp(1000, 'easeOutBounce')"&gt;Slide Up&lt;/button&gt;
                    &lt;button class="button"
                        onclick="$('#div-slide2').slideDown(1000, 'easeOutBounce')"&gt;Slide Down&lt;/button&gt;

                    &lt;div id="div-slide2" class="demo-box bg-red"&gt;&lt;/div&gt;
                </code></pre>

            </main>
        </div>

    </div>

    <script src="docsearch/docsearch.min.js"></script>


    <script src="metro/js/metro.js?ver=@@b-version"></script>
    <script src="highlight/highlight.pack.js"></script>
    <script src="js/clipboard.min.js"></script>
    <script src="js/site.js"></script>
    <script>
        $('#div-slide').origin("slidedown", true);
        $('#div-slide2').origin("slidedown", true);
    </script>
    <!-- ads-script -->
    <!-- ga-script -->
    <!-- hit-ua -->
</body>
</html>